package com.itheima.itheima_health.Spring_Security.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
@Slf4j
public class HomeController {

    @GetMapping("/")
    public String index() {
        return "login"; // 主页
    }

    @GetMapping("/login")
    public String login() {
        log.info("/login");
        return "login"; // 登录页面
    }

    @GetMapping("/home")
    public String home() {
        log.info("/home");
        return "home"; // 登录成功后的首页
    }
}